shell script function with parameters and return value