almost final changes/fixes