change parameter name and fix a few