Added saving to db