solve unique paths