Refactored the Code a bit