update set impl
fix unicode handling in py 2.x