new version + bugs correction