added ability to accept mask as command line argument