improve some functions and UI