saving visits to sqlite db