classfoo's code