change to calculation method