added AJAX support for answering tasks