add listeners and events