refactor on night module