an attempt to solve task #5