add bounds checking