storing only the first and second minimum values per check node