out of range error corrected