update and add unit tests