move mysqli functionality to its own class.