hacked testVal() using as.character -- should be changed after meeting with daphne