edits to fix assignCatchments function