implement mvc, layout fix