Reformatting & changed variables for clarity