moved data states from img to div