refactoring to use Berks