added score functionality