finished product dangling else might not be right
clean dangling else still missing
finished and tested