Improve scoring algorithm