add doc
unify variable naming