some functions changed