working but the calculations seem off