added polymode cloning