add reflect and ref and fix the masonry problem

complete reflection

complete references

fixed glitch in the matrix