some improvements added