use getcode

Change-Id: I8d0ff8ff157f64d9e1e715495f494259ecb452a6