tests added and multiple events bug fixed