tweaked mysql stuff