script for keeping track of cases