added papi.avail() check to system.event() interface