externalize listeners into its own class