Really res.code is an Integer so no need to do the to_i