Changed the function K-Core