cleaning up mask and unmask