modified to take arguments
modified rad to take sys arg