modify score calc function