connected backend and populating mongodb collections