hopefully solving multiple instance problem