added -check if document is undefined before using
update package version