rewrote some variables