Refactor adding looper