made the generic server layer python3 compatible