Tested, updated with new calculation