updates stack