Added periodic frame switching