upgrade functionality

added upgrade functionality for buildings