1st draft of insert/update activity to event, with bugs