simple implementation of a rational number