begin rewrite for 0.1 (incomplete)