Changed to be nicer implementation