replaced python call to sum up ascii values with bash function