putting in some mongodb connectivity logic and some grid prototyping