adding documentation, making a few tweaks