added bucket data structures for easy interface with mongo