edit layout and model