wrote cell clustering code