DB insert functions, not quite working yet