Save data on DB optimization
added some comments