some improvements here and there