main architecture