using mongo as database