added block diagram