1st part of the assignment some modification