finished function in class