add db insert and select