refactored code and fixed a bug
refactored code and fixed a bug