checking bounds for locations