use dollar p to recognize, but resample has issues, only one object left