active record mixin - first quick pass