separated functions into separate source files. this turned out to be a bigger project than i anticipated