added argsToArray method and tests