Use halfwidth variable where needed