weighted value working