separate functions into modules