moved code to get the latest snapshot into doc-class