improve unit testing