Rewrite with simpler interface