fixed to pass unit test