following ports by Kurt Hornik

following ports by Kurt Hornik