extend to S4 class