main function seperation test