added some improvements