modified architecture diagram as per meghana's comments