version without refact