add getState function
fix variable name in documentation