Temporarily finished work at switch-case. First tests show the desired results