updated documentation script, merged some features