handle S4 class issue
handle S4 issue