rewrite with coffee, and rewrite test