allow chains longer than 2
add score
remove debugging code