state scope in method definition