Add generate boolean mask method