putting masks in a method