Updated if tree - written in too much haste!