working struct conversion