some minor improvemenets here and there