Code from revised function in class