calc: finally got it working