updated code for new library, scoring system, next piece indicator