code review, added helper methods