replace groovy script with card script