reworked the code to be in adequation with the expected result.