added return check and started checking break