finish basic functions.