Rewrite with a simpler interface