Changed hard coded numbers to variables for cleaner code