adding code for saving store layout