further refined core.rs