finalized the object store usage to save data

with fixed AVG calculation too.