Add function: addBuilding, make buildingfunctions flexible