updated for unit test