refactor module structure