all test cases are passing, need a big factor..looking at a recursive solution based on my current code