move mask implementations to utility file