updated the application adapter to work for inserting and querying records