Added the initial implementation. Totally untested.