add reflect and ref and fix the masonry problem