fully implemented fital parts of output plugin