refactored code and added form