Adding the new challenge
improving performance and removing unecessary funcitons