fix half of functions