Wrote basic db insert functions