Implement score function
add logging to show score details