working on a simple solution for wmf.optimize