started working on loop unwinder