better names for vars

because upper may be lower than lower