rewrite decompsition of symbols
code is awful, crashes sometimes and results could be incorrrect
but, it definitely better than previous one