Code amended to add new arguments