convert variables to int when appropried