Added flow diagram