Add functionality to connect with mongodb