improve core.hpp