Import from erocci code