map bounds checking