moving tests from main() to actual tests