version without arrays usage