added files to write core logic in mongodb