add assignment 5
implement all helper methods