'outsourced' some shell function