fixed bugs
added documentation
fixed bugs