Finish the basic function