minor changes - renamed some variables