Implemented the case when value + added a test for it.