added new architecture and some fixes