matching inside clock event. see #4
various cleanups