Wrote an initial version.