converted to arc and modernized