rename selectInstances in getAllInstances