added getEvents, few fixes