finished prototype of Combinatorial optimizer. Must be covered by tests