wrote basic fraction functionality