modified to be able to post a long query time