modify weighted function & change target to family