functions refined. closes #25
tests refined
manuals refined