updated to use PDO and SQLite