added misfit example
more testing, fixed bugs, more documentation