improved handling and docs.