did battle with prepared statements