finish basic layout and function