implemented helper methods for second task