prepared some algorithm for solving -- not tested