updated typechecker to read directly from msyql db