actually functional, interfacing with mysql