mask processing