search by priority