almost working static + dynamic example