moved test code into test folder