added structure and template