very first implementation of decompostion