duplicate creation of the boolean mask