Implemented listener behavior.