scale based on maximum rows