delete version function and trash