some changes from v1.0 copied into master branch