some faster routines
combined code
updates and now passes R CMD check again