Solves task nr 3