implementation to pass updating in weights test