solved 15% problem by moving to first if statement to override the else if's of 3 and 5