update bash function