Refactored the code a little