initial work on scoring algorithm