write to fb in the same loop