Finished second task. Next - little refactoring