rewrite for 2.0