refactor to support zip files,clean samplenamespac