correctly calculate width based on non 0 based array