take a filename as input