Added emit and pack
Added core function