pack loose functions into modules