added function contract