implemented task #2