refactor class layered colocation graph