replace groovy code with ability in card script