adding the memory out of range exception