adds callbacks for activities