add method set code