moving code to modules dir