refactored and added module