added an optimization on data storage