improved mode selection
leap integrated