add loop and fd