implement cleanup script