improve script

Change-Id: I12e0839a0c3e69e0c082002707e8b76abf3f8f0c