more work on calculations