added back in restrict to A
merge conflicts fixed