advanced python: fix type