code optimization: Tab is not updated/DOM manuplation when it is not active.