added masks to output