Modified rules and updated the layout