renames some locals to clarify intent