fix code from previous class