Created working version - nested if/else

Created a messy working version of the problem using a few nested if/else statements.