accepts url or file