added architecture for looping