complete the basic functions