added pdo query helper with tests