added cmp function to fraction class