added more documentation
cleaned up