added delete function
Merge branch 'master' into 4.1