Changed save logic table function.