Removed unnecessary variables & range search only checks upper bonds