changes to use with python-pydown (https://github.com/isnowfy/pydown)