cleaned up makeevent code