added AJAX support w/ $q