refactoring. adding html summary