Updated to reflect changes made in the rewrite