add tests and masonry support