added functions for higher order approximations
hoa()