started working on saving to db