simpler decompose method
mostly implemented new decompose functions.