add additional fields handling
fix docblock
updated from upstream