moved split mosiac to stand alone func