implemented database with mongodb