finish wrapping low level functions