app architecture + event listener