layout and beginning functionality