improvement on unit tests