Updated unit creation to include attempts count