calculator for Diman. It is bad, I know(