parseFraction method added