parsing if-else statements