solved struct problem