moved main to layout