adding logic to keep score