updated scoring calculation