//TODO: changed the flow as per requirements