fix insertion problem
lay framework for better saving