use listener interface.