slight changes to calculation