added maske calculations