added Khun implementation and isBipartite method