added notes and made mean vector example clearer through better var names