out of bounds exception catching