implement rational numbers