Weight function simplify