changed str cast to unicode