nit: `var offset =+ attrs.offset;`