I have seen various examples where the "Type" function is used but I still do not understand how to create functions and sub routines that interact with each other