fix a few parameters and add more documentation