Moved functions to new file, renamed test file, added functions
resolved merge conflicts