seperating test and main code