cleanup  to run on device