Modified to receive files