switch everything to PDO, finally, see #1