[Optimize] Avoid double calling function
[CLEAN] Clean code