merged Yee Chin's changes