finishing up basic functions