move pt free out to dep