fixed nested if/while statements. handled break/continue