moved test functions to their own file