layout refining