update and add unitTest