added calculation of costs to build units dialog