delete function working in command line