added function f