reduced memory usage of example