migrated to python3, needs testing