returning structure state object to view