working with mongodb now
two modes: using and not using database