completed basic functions.