Copied updated code from Sentora Git

Updated to match the current Sentora Git file