refactor for handling excerpts