as usual - guessed the AR version wrong = only type cast on 3.1
inline the to_integer conversion - without the need to catch exceptions from to_i