changed score incrementation and added boolean check for already scanned codes