replaced different truncate to mm calculations with single function.