made some code changes to make naming more consistent