bug fix, Added user code