simpler residuals
first working version of plugin, but need debug
first working version of plugin, but need debug