adapat layout of contract