Changed Masks to char instead of integer