functions fixup - incomplete