adding score functionality