How to create functionalize CNT for Outside and inside?

Dear all,
I am using scripts written by Reinier and Jason to functionalize the CNT structure. However, one problem I encountered was that, unlike the successful examples of functionalized graphene nanosheets, no matter I chose "both", "top", or "bottom", the structure I got was still unreasonable. How can I modify the script to make it work to create functionalize CNT for outside and inside or both sides.
Thanks in advance

Jamie