working building class for resource building
merged building branch