This version also exceeds time limit