update postion argument handling in handle_ajax method