No frame building erected or altered after February 20 1917 shall exceed two stories or thirty feet in height, except that private dwellings may be three stories or forty feet high.