Add calculate_score function for personal project