more refactoring
more refactoring
finished refactoring scoring function