re-replaced get_weight with getWeight