add unit tests and web tests