use riffle
fixing filename typo, activites -> activities
refactoring activity caching