added events for tablemodel