trying to fix calculations