renamed variables
minor changes