added calc_modal snippet