added code
added tests
updated README