improve gloomyAjaxAction()