encountered some recursive issue, found a possible solution ( distinguing link and piece )