127 works for small cases. moving away from recursion for bigt ones