finished version of in class