grad from file or url