fix basic functions