fix interface. remove inline routines.