delete functions implemented with mongodb