added tests and changed layout