added tests and some debug / added docs to README