Another thing I'll throw in...
if [[ $choice = c || $choice = C ]]
I've never been able to get an OR to work in ksh. You're using bash, so it might work. Generally I use the 'tr' command to translate things to either uppercase or lower case.
Something like this:
UPPERCASE=`echo $choice|tr [a-z] [A-Z]`
LOWERCASE=`echo $choice|tr [A-Z] [a-z]`
When it is all done UPPERCASE will have an uppercase version of $choice, and LOWERCASE will have a lowercase version of $choice.
Last thing: the general rule with functions is to put them at the top of your script. This is because the scripts are executed a line at a time and a function at the bottom won't be seen until the very end of the script. When you put it at the top it is loaded into memory and can be used at any point during the script.