move logger out. attempt to replace example with db. not quite right yet