separate functions into appropriate objects