several additions/fixes