make some functions inline