adding functions.  not sure why i can't put getopts in there