implemented task#4