removing unused variables and parameters + update DOC