adds wordScore function