note: please add a unit test for this case