modify some functions and views