complete basic functions.