improved saving class