added in that functions can be used instead of a weight