replaced vars().has_key(...) with ... in dir() since the former syntax does not work anymore in rel22