moved security functions from System into Security;