updated variable names throughout