when you have one line after an else I without brackets, it's good to add an empty line afterwards to make it clear (or add brackets in this case).  Also the else should move onto the previous line

    } else