http://www.artifacting.com/blog/2009/04/28/prepare-primp-edit/