generically handles all methods