better width handling