rewrote instagram implementation