added structure, updated controller