refactor module to routes