add doc strings, minor changes