moved trivial function to header