added basic functions to use with mongo