integral functions in utils.C