replacing preferred-width and preferred-height with preferred-size