adds callbacks for listeners