made most methods generic