adding mongodb and also logic to filer post requests with existing files