add code to save water mask