change: add record function--write to sqlite db