several improvements/additions