moved code into src folder