added tests and new layout