new version with modifications