implementation of the assignment at he end of the day with error free execution