improved update code.
improved update code.
Merge branch 'test' into dev