removes useless _mask_image function