Function writes fractions with denomiator of 1 nicely