Please add tests rather than rewrite. The old functionality needs to be retained while the new functionality is added