Some update and optimization