Use listener instead of std::function