code for mosiacing