Try indenting the code between if, else, elsif, and end... it's not required for valid syntax (like Python), but does aid in code readability.