added unit tests - but not sure if they worked!! lol