removed mongodb api and added socket api