initial checkin
fixed typo
redesign and reimplementation of rules and events