initial copy from seneca repo