improvements. almost final