fixed storing routine