fixes #19 Tests and docs