python3 compatible.
rewrite note.