updating docs + adjusting code