decompose works correctly