implement some unit testing