implemented crazy method by evgeny
extracted helpers to separate file, nothing works