modified some functions called