renamed filename to name since it could be the url