function in shell script with arguments and return