trying to get s3 methods to match generics