Implementing a mongodb command.