improved attend code
New infrastructure for events