teacher flow cleaned up