added putEvent method