some pytave modifications