functions: in-class assignment