started code to generate first segment of view