added the in directory to the switch function for making prop.df