Implemented decompose method