Wrote skeleton code, compiles but hasn't been tested.