changed scorelength() to scoreLength()