Update main.cpp

minor refactoring. hello, habr!