added tests and notes