Added bounds checking and sizeOf