further optimizations to score