defined setup test and calculate score methods
modified used testcode as parameter for finish test
fixed erros