begin if else for following a line