caching and test refactoring
using refactored tests