solution to uniquePaths