Root Check Added

Added Root Check Algorithm