use aggregate mask correctly