Adding solution of the 4th task from the example test