decode binary strings to make python 3 compatible