no longer i!*j!*k! complexity =(