refined layout algorithm for box instad of cell rendering; formatting; sizing