code from mid-class