finish all basic functions.