change field value in a method