Adding ReplicaSet support
removed dead code here