changed types to rational to deal with big numbers!