generalized level selection