optimization of core data stuctures