fixed stuff and updated documentation

fixed stuff and updated documentation