restructure for compatibility