updated calc so it works