Removed 'val' from loop parameters.