updated of.function