modify implementations for forstatement, whilestatement and ifstatement