adding the code which will show the bug