changed print function and encoded strings to bytes to make everything compatible with python3