Added methods for outOfBounds checking