Refactored code to accommodate tax paying and non tax paying states