Update

Improve the code