finish core functions except the last bit