castle is a kind of building