almost finish the basic functions