Working version, needs debugging