added parameterized query for posting