Added finding all solutions instead of the first one