Addapted sample to listener api extension