removed extra loop in openMindWrapper