Added integral function