updated permission, min version
added win function
merging