made string_score a standalone function, export as umd