Add support for a mask
Signed-off-by: Bob <rbatzing@gmail.com>