added functions to characterqueryhandler