using files as input