#6 create a mask outside of loop