hacked together a way to include the connection in class methods