Added a check in the while loop for the ifStmt in the map.
Added code to add currrent ifStmt to the map.
Removed unncessary print statement
Modified logical and to return expression