out of range problem solved