adds title
adds some tests, a bit of refactoring
mods some tests