added spec and made changes for mongodb