finish basic funtions