First version of the second task