in class version
fixed setwd