semifinal tests script. needs to be revised