using now prepared statement in databasecontroller to get batches