add summary method and S3 method support