some improvements;
saved current state;