moved main() to its own file