defined weight and cgars functions