finish basic functions