better reverse interger with boundary check