trying to fix bug my converting to integer