clar: make it compatible with python3