renamed vars
updated range