added the generic method class