need a way to check for memory errors.