Worked with lattice path count logic