add `recalcWidth` to the API (solves #2)