Going through the code, it does seems overly complex compared to zorro's built in functions.