moving db connection to global var
really basic front end support for multiple groups