added tests and some styling