added bash function