set function in the correct object context