Implemented the task No.5