[mod] refactor k-core implementation