various additions/fixes