Краснояров - Лабораторная работа #3

 Move [ and ] to return statement, i think for , it's not so neccecary