fixed code after core.rs removal