trying to fix the variable offset length