add fraction class and fix log and calculation