added harness code
merged with xiaolan's code