common code for Architect