adjust to add unit tests