Add some functions and some changes