move fd out of ribs context