updated (has problem of restart)