add some tests and karma