move code into src directory