Updated with renamed variables