exported partial, some fixes