add real save to db
fix bugs