use to_i to converto to integer to do the avoid comparsion error