made repalce more able to detect dataframe classes