added events, fixed some validation errors