instagram refactor