cleaned up binary searches