connected with mongodb instead of localstorage