fixed pydoop formula according to adamv's comments
pydoop formula: minor cleanup