renamed vars, added notes