improvements on unit test