refactored code by moving the class in to the server file
refactored code by moving the class in to the server file