method in S4 class