added function replacement