adding bit mask check