implementation of simplify, do not use until ui is ready