[fix] clean up the code