refactored method score